<!DOCTYPE html>
<html>
<head>
    <title>管理员登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</head>
<body class="gradient-bg">
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <div class="container mt-3">
                <div class="alert alert-info alert-dismissible fade show" role="alert">
                    {% for message in messages %}
                        <div>{{ message }}</div>
                    {% endfor %}
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            </div>
        {% endif %}
    {% endwith %}
    <div class="container d-flex justify-content-center align-items-center min-vh-100">
        <div class="card shadow-lg animate-card">
            <div class="card-body p-4 p-md-5">
                <h2 class="text-center mb-4">管理员登录</h2>
                <form method="POST">
                    {{ form.csrf_token }}
                    <div class="mb-3">
                        {{ form.username(class="form-control", placeholder="用户名") }}
                    </div>
                    <div class="mb-3">
                        {{ form.password(class="form-control", placeholder="密码") }}
                    </div>
                    <div class="d-grid">
                        {{ form.submit(class="btn btn-primary btn-hover") }}
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>